package com.ccm.demo.cloudeurekafeign.controller;

import com.ccm.demo.cloudeurekafeign.api.Service2;
import com.ccm.demo.cloudeurekafeign.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloWorldController {
//	@Resource
//	private Service1 service;
	@Resource
	private Service2 service;

	@RequestMapping("result")
	public Integer result(Integer a){
		Integer add = service.add(10);
		return add;
	}

	@RequestMapping("getUser")
	public User getUser(User user){
		return service.getUser(user);
	}
}
